﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace eDepotSystem
{
    public class Driver
    {
        protected string userName;
        protected string password;
        protected string depotName;
        bool scheduleChanged;

        public Driver(
            string userName,
            string password,
            string depotName
        )
        {
            this.userName = userName;
            this.password = password;
            SetDepotName(depotName);
        }
        public Driver(
            string userName,
            string password
        )
        {
            this.userName = userName;
            this.password = password;
        }
        public bool CheckPassword(string password)
        {
            if (password == this.password)
                return true;

            return false;
        }

        public bool WorkScheduleUpdated()
        {
            throw new NotImplementedException();
        }
        public string GetUserName()
        {
            return userName;
        }
        public string GetDepotName()
        {
            return depotName;
        }
        public void SetDepotName(string depotName)
        {
            this.depotName = depotName;
        }

        public bool IsScheduleChanged()
        {
            if (scheduleChanged)
            {
                scheduleChanged = false;
                return true;
            }
            return false;
        }
        public void ScheduleChanged(){
            scheduleChanged = true;
        }
        
    }
}
